#include<stdio.h>

void main()
{
	void inverse(int arr[], int n);
	int a[] = {3, 4, 2, 4, 1, 3, 6, 7, 8, 12};
	printf("The original array is :\n");
	for(int i = 0; i < 10; i++)
	{
		printf("%d ", a[i]);
	}
	printf("\n");
	inverse(a, 10);
	printf("The inverse array is :\n");
	for(int i = 0; i < 10; i++)
	{
		printf("%d ", a[i]);
	}
	printf("\n");
}

void inverse(int a[], int n) // void inverse(int * x, int n)
{
	int t, i, j = n - 1, m = (n - 1) / 2;
	for(i = 0; i <= m; i++, j--)
	{
		t = a[i];
		a[i] = a[j];
		a[j] = t;
	}
	return;	
}
